
;;程序头部注释及作者说明：含有：日期时间戳 带星期等全格式 emacs自带格式，不需要date外部命令 | 电子邮件
; ----------------------------
(defun insert-info ()
  (interactive)
  (insert
;   (format-time-string "/** \r\n * @filename    \r\n * @use         \r\n * \r\n * %Y-%m-%d.%H:%M:%S, %p, %A, 第%W周 第%j天 %Z %z  \r\n * @access      public \r\n * @category    \r\n * @package     \r\n * @author      <root_@126.com> \r\n * @copyright   \r\n * @license     GPL_v2 <http://www.gnu.org/licenses/gpl-2.0.html>\r\n * @version     \r\n * @link        \r\n *              <http://so-u.info> \r\n *              <http://timeline.menu> \r\n *              <http://exploreroot.com>  \r\n * \r\n * ------------------------------------------------ \r\n *  \r\n *  Write algorithm here \r\n *  \r\n *  \r\n *  \r\n */ \r\n \r\n")
   (format-time-string "/** \n * @filename    \n * @use         \n * \n * %Y-%m-%d.%H:%M:%S, %p, %A, 第%W周 第%j天 %Z %z  \n * @access      public \n * @category    \n * @package     \n * @author      <root_@126.com> \n * @copyright   \n * @license     GPL_v2 <http://www.gnu.org/licenses/gpl-2.0.html>\n * @version     \n * @link        \n *              <http://so-u.info> \n *              <http://timeline.menu> \n *              <http://exploreroot.com>  \n * \n * @changetime \n *              \n *              \n *              \n *              \n *              \n *              \n * ------------------------------------------------ \n *  \n *  Write algorithm here \n *  \n *   \n * ------------------------------------------------ \n * echo EOL.' ------------------  --------------------- '.EOL;\n */ \n \n")
   )
  )
; ----------------------------^

;;日期时间戳 带星期等全格式 emacs自带格式，不需要date外部命令
    (defun insert-time-full ()
	  (interactive)
	  (insert (format-time-string "%Y-%m-%d.%H:%M:%S, %p, %A, 第%W周 第%j天 %Z %z" (current-time) )))

;;日期戳 带星期 emacs自带格式，不需要date外部命令
    (defun insert-date-week ()
	  (interactive)
	  (insert (format-time-string "%Y-%m-%d %A, 第%W周 第%j天 %Z %z")))
;	  (insert (format-time-string "日期：%Y-%m-%d 星期：%A, 第%W周 第%j天 ")))

;;时间戳
    (defun insert-time ()
	  (interactive)
	  (insert (format-time-string "%Y-%m-%d.%R")))

;;日期戳
    (defun insert-date ()
	  (interactive)
	  (insert (format-time-string "%Y-%m-%d")))

;;本星期戳
(defun insert-current-week () 
	  (interactive)
	  (insert (shell-command-to-string "echo -n $(date +'%Y年，第%V周')"))
	  (insert " 从 ")
	  (insert (shell-command-to-string "echo -n $(date -d 'last monday' +'%Y-%m-%d')"))
	  (insert " 到 ")
	  (insert (shell-command-to-string "echo -n $(date -d 'this friday' +'%Y-%m-%d')"))
	  )
